﻿<Window x:Class="Hopfield.Simulator.WPF.MainWindow"
    xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dg="http://schemas.microsoft.com/wpf/2008/toolkit"
    Title="HopfieldSimulator" Height="500" Width="500" Icon="icon.ico" Background="GhostWhite">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Name="rowMenu" Height="20"/>
            <RowDefinition Name="rowSimulator" />
            <RowDefinition Name="rowToolBar" Height="30"/>
        </Grid.RowDefinitions>
        <Menu Height="22" Name="menuMain" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Background="GhostWhite">
            <MenuItem Header="File" Name="menuItemFile">
                <MenuItem Header="Open" Name="menuItemFileOpen" Click="MenuItemFileOpen_Click"></MenuItem>
                <MenuItem Header="Save" Name="menuItemFileSave" Click="MenuItemFileSave_Click"></MenuItem>
            </MenuItem>
            <MenuItem Header="Simulator" Name="menuItemSimulator">
                <MenuItem Header="Learn" Name="menuItemSimulatorLearn" Click="MenuItemSimulatorLearn_Click"></MenuItem>
                <MenuItem Header="Simulate" Name="menuItemSimulatorSimulate" Click="MenuItemSimulatorSimulate_Click"></MenuItem>
            </MenuItem>
            <MenuItem Header="Attractors" Name="menuItemAttractors">
                <MenuItem Header="Add" Name="menuItemAttractorsAdd" Click="MenuItemAttractorsAdd_Click"></MenuItem>
                <MenuItem Header="Remove selected" Name="menuItemAttractorsRemove" Click="MenuItemAttractorsRemove_Click"></MenuItem>
            </MenuItem>
        </Menu>
        <TabControl Grid.Row="1" Name="mainTabControl" Background="GhostWhite">
            <TabItem Header="Pictures" Name="tabPictures">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Name="rowPictureSimulator" />
                        <RowDefinition Name="rowPictureSetup" Height="70"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Name="colPictureSimulator" />
                        <ColumnDefinition Name="colPictureAttractors" Width="120"/>
                    </Grid.ColumnDefinitions>
                    <GroupBox Grid.Row="0" Grid.Column="0" Header="Simulator" Name="groupBoxPictureSimulator">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Name="rowSimulatorImage" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Name="columnSimulatorImage" />
                            </Grid.ColumnDefinitions>
                            <Image Name="imageSimulator" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                        </Grid>
                    </GroupBox>
                    <GroupBox Grid.Row="0" Grid.Column="1" Header="Attractors" Name="groupBoxPictureAttracotrs">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Name="rowAttractorsList" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Name="columAttracotrsList" />
                            </Grid.ColumnDefinitions>
                            <ListBox Name="listBoxAttracotrs" Grid.Row="0" Grid.Column="0" SelectionChanged="ListBoxAttracotrs_SelectionChanged" />
                        </Grid>
                    </GroupBox>
                    <GroupBox Grid.Row="1" Grid.ColumnSpan="2" Header="Setup" Name="groupBoxPictureSetup">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Name="rowSetupFirs" />
                                <RowDefinition Name="rowSetupSecond" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Name="columSetupFirst" />
                                <ColumnDefinition Name="columSetupSecond" />
                                <ColumnDefinition Name="columSetupThird" />
                                <ColumnDefinition Name="columSetupFourth" />
                                <ColumnDefinition Name="columSetupFiveth" />
                                <ColumnDefinition Name="columSetupSixth" />
                            </Grid.ColumnDefinitions>
                            <Label Grid.Row="0" Grid.Column="0" Name="labelNoisePercent" VerticalAlignment="Center" HorizontalAlignment="Right">noise %:</Label>
                            <TextBox Grid.Row="0" Grid.Column="1" Name="textBoxNoisePercent" VerticalAlignment="Center" Text="35" TextChanged="TextBoxNoisePercent_TextChanged"></TextBox>
                            <Label Grid.Row="0" Grid.Column="2" Name="labelD" VerticalAlignment="Center" HorizontalAlignment="Right">d:</Label>
                            <TextBox Grid.Row="0" Grid.Column="3" Name="textBoxD" VerticalAlignment="Center" Text="128" TextChanged="TextBoxD_TextChanged"></TextBox>
                            <Label Grid.Row="0" Grid.Column="4" Name="labelEta" VerticalAlignment="Center" HorizontalAlignment="Right">eta:</Label>
                            <TextBox Grid.Row="0" Grid.Column="5" Name="textBoxEta" VerticalAlignment="Center" Text="0.7" TextChanged="TextBoxEta_TextChanged"></TextBox>
                            <CheckBox Grid.Row="1" Grid.Column="1" Name="checkBoxCharts" VerticalAlignment="Center" HorizontalAlignment="Left" Checked="CheckBoxCharts_Checked" Unchecked="CheckBoxCharts_Checked">Charts</CheckBox>
                            <CheckBox Grid.Row="1" Grid.Column="3" Name="checkBoxColors" VerticalAlignment="Center" HorizontalAlignment="Left" Checked="CheckBoxColors_Checked" Unchecked="CheckBoxColors_Checked">Colors</CheckBox>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>
            <TabItem Header="Predictor" Name="tabPredictor">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Name="rowPredictorGrid" />
                        <RowDefinition Name="rowPredictorSetup" Height="70" />
                    </Grid.RowDefinitions>
                    <GroupBox Grid.Row="0" Name="gridBoxPredictorGrid" Header="Predictor">
                        <Grid>
                            <dg:DataGrid Name="dataGridPredictor" Background="GhostWhite" AutoGenerateColumns="True" Margin="10" RowHeight="20" RowHeaderWidth="10" />
                        </Grid>
                    </GroupBox>
                    <GroupBox Grid.Row="1" Name="gridBoxPredictorSetup" Header="Setup">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Name="rowSetupPredictorFirs" />
                                <RowDefinition Name="rowSetupPredictorSecond" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Name="columSetupPredictorFirst" />
                                <ColumnDefinition Name="columSetupPredictorSecond" />
                                <ColumnDefinition Name="columSetupPredictorThird" />
                                <ColumnDefinition Name="columSetupPredictorFourth" />
                                <ColumnDefinition Name="columSetupPredictorFiveth" />
                                <ColumnDefinition Name="columSetupPredictorSixth" />
                            </Grid.ColumnDefinitions>
                            <Label Grid.Row="0" Grid.Column="0" Name="labelPredictorD" VerticalAlignment="Center" HorizontalAlignment="Right">d:</Label>
                            <TextBox Grid.Row="0" Grid.Column="1" Name="textBoxPredictorD" VerticalAlignment="Center" Text="128" TextChanged="TextBoxD_TextChanged"></TextBox>
                            <Label Grid.Row="0" Grid.Column="2" Name="labelPredictorEta" VerticalAlignment="Center" HorizontalAlignment="Right">eta:</Label>
                            <TextBox Grid.Row="0" Grid.Column="3" Name="textBoxPredictorEta" VerticalAlignment="Center" Text="0.7" TextChanged="TextBoxEta_TextChanged"></TextBox>
                            <Label Grid.Row="0" Grid.Column="4" Name="labelPredictorDelta" VerticalAlignment="Center" HorizontalAlignment="Right">delta:</Label>
                            <TextBox Grid.Row="0" Grid.Column="5" Name="textBoxPredictorDelta" VerticalAlignment="Center" Text="0" TextChanged="TextBoxPredictorDelta_TextChanged"></TextBox>
                            <Label Grid.Row="1" Grid.Column="0" Name="labelPredictorN1" VerticalAlignment="Center" HorizontalAlignment="Right">n1:</Label>
                            <TextBox Grid.Row="1" Grid.Column="1" Name="textBoxPredictorN1" VerticalAlignment="Center" Text="6" TextChanged="TextBoxPredictroN_TextChanged"></TextBox>
                            <Label Grid.Row="1" Grid.Column="2" Name="labelPredictorN2" VerticalAlignment="Center" HorizontalAlignment="Right">n2:</Label>
                            <TextBox Grid.Row="1" Grid.Column="3" Name="textBoxPredictorN2" VerticalAlignment="Center" Text="10" TextChanged="TextBoxPredictroN_TextChanged"></TextBox>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>
        </TabControl>
        <StatusBar Grid.Row="2" Name="mainStatusBar" Background="GhostWhite">
            <StatusBarItem Name="labelStatus">
                <TextBlock Name="statusBarStatusLabel" Text="Ready."></TextBlock>
            </StatusBarItem>
            <StatusBarItem Name="labelMSE">
                <TextBlock Name="statusBarMSELabel" Text="MSE = ?"></TextBlock>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</Window>
